home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14968 < prev    next >
Encoding:
Text File  |  1996-08-05  |  3.7 KB  |  77 lines

  1. Newsgroups: comp.lang.c++
  2. Path: news.sprintlink.net!eskimo!dai
  3. From: dai@eskimo.com (Davidson Corry)
  4. Subject: Re: C++ as introductory programming language
  5. X-Nntp-Posting-Host: eskimo.com
  6. Message-ID: <Dp9Bo1.MA4@eskimo.com>
  7. Sender: news@eskimo.com (News User Id)
  8. Organization: Eskimo North (206) For-Ever
  9. X-Newsreader: NewsWerthy 1.71 (unregistered)
  10. References:  <4j999p$nbl@sullivan.ucc.hull.ac.uk>
  11. Date: Tue, 2 Apr 1996 22:55:12 GMT
  12.  
  13. Warren Viant <W.J.Viant@dcs.hull.ac.uk> 
  14.   (in <4j999p$nbl@sullivan.ucc.hull.ac.uk>) asks:
  15. > I'm currently formulating a case to use C++ as the first
  16. > programming language for our first year undergraduate degree
  17. > course in computer science.  Do any members of the group have any
  18. > comments/references, both for and against C++ as the first
  19. > language.
  20.  
  21. Since my 'milk' languages were all procedural (machine, FORTRAN II, 
  22. assembly, PL/I and Snobol, in that order), it's hard for me to imagine 
  23. learning object-oriented design as a first paradigm.  And I would very 
  24. much like to learn how such students turn out.
  25.  
  26. I suspect that C++ is +not+ the language best suited to teaching O-O to
  27. the programming novice.  It is simply too large (in terms of features, 
  28. mechanisms and concepts).  While it provides tools for writing truly 
  29. object-oriented programs, these tools are among the most advanced and 
  30. abstruse of C++'s features.
  31.  
  32. And to write a successful program, even using these features, you must 
  33. first master a smaller subset of the language that is, for all intents 
  34. and purposes, C -- which has its own pitfalls, and in which it is 
  35. perilously easy to "accidentally" write NON-object-oriented programs.
  36.  
  37. While I disagree with those who hold that this fundamentally 
  38. disqualifies C++ as a truly object-oriented language, I +do+ think it 
  39. puts too many obstacles in the way of the average Joe trying to learn 
  40. the entirely alien skill of any sort of programming at all.  (I'll 
  41. admit, I would love to be shown otherwise.  But I don't expect to be.)
  42.  
  43. I would liken C++-as-a-first-language to trying to teach a new pilot on
  44. a multi-engine jet.  What you +want+ is a Piper Cub.
  45.  
  46. The Cub I have in mind is awk.  It is "small" enough to be learned in a
  47. few weeks, mastered in a semester.  The novice can begin writing actual,
  48. working programs in it almost immediately.  awk is capable enough that 
  49. these programs can be really useful and practical.  And the language has
  50. some intriguing features, e.g. associative arrays, that even the "big" 
  51. languages lack.
  52.  
  53. On the practical side, implementations of awk are available for 
  54. virtually every platform you might want, at prices ranging from 
  55. inexpensive to free.  (Dunno how things are at Hull, but over here West
  56. of the Water, our schools always have more ideas than money to pay for 
  57. them...)
  58.  
  59. Last, awk is small enough that the student will quickly outgrow it.  
  60. He'll begin bumping up against awk's limitations, and realize why 
  61. concepts like strong typing, encapsulation, inheritance, etc. -- and 
  62. tools like debuggers and IDE's -- are needed for serious work.
  63.  
  64. True, awk is not object-oriented (and I'm not familiar enough with O-O
  65. languages to know if there's an awk-sized one available).  But the 
  66. investment awk requires is small enough that you can discard it and move
  67. on (to Smalltalk, say -- or to C++) without feeling guilty about it. I 
  68. feel, and I suspect that many of my colleagues would agree, that my not 
  69. inconsiderable skills in C, acquired over many years and with which I 
  70. have grown comfortable, often impede me from moving on to truly elegant 
  71. use of C++.
  72.  
  73. Just a few thoughts.  I hope you find them useful, or at least amusing.
  74.  
  75.                                              -- Davidson Corry
  76.                                                 dai@eskimo.com
  77.